# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libeatmydata
pkgver=105
pkgrel=0
pkgdesc="An LD_PRELOAD library that disables all forms of writing data safely to disk"
url="https://www.flamingspork.com/projects/libeatmydata/"
arch="all"
license="GPL-3.0-or-later"
makedepends="autoconf automake libtool"
checkdepends="strace"
source="https://github.com/stewartsmith/libeatmydata/archive/libeatmydata-$pkgver/libeatmydata-$pkgver.tar.gz
	18.patch"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

prepare() {
	default_prepare

	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check-debug
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="225453a12913c08fd91371e3546a256e102438f9a88e7f51726dd5befbcf6c396850c039a38ca3d939558f0369df23d232e24b487564cdf86562645b8b5f92d6  libeatmydata-105.tar.gz
8fff381b392cf7ee3faf39c41e20d3f152529ec4b2d4ffb503695ff8dce49b86872cbcc56001b2160b617ceb76bb4d1d389939922b1d539413a00fea35904b2a  18.patch"
